package com.googlecode.pacswitch;

import java.nio.channels.AsynchronousSocketChannel;

import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

/**
 * @author Andrey Pavlenko
 */
@XmlJavaTypeAdapter(PIntegerAdapter.class)
public class PInteger extends PString {

    public PInteger(final int value) {
        this(String.valueOf(value));
    }

    public PInteger(final String text) {
        super(text);
    }

    public int resolveInt(final PacSwitch ps,
            final AsynchronousSocketChannel clientSocket) {
        return Integer.parseInt(super.resolve(ps, clientSocket));
    }
}
